/**
 * Copyright  (c) 2009-2013 XLab,  Org. 
 * All  rights  reserved. 
 */
package org.xlab.baseframework.domain;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.MappedSuperclass;
import javax.persistence.Version;

import org.xlab.baseframework.domain.enumerate.EnumDeletedIndentifying;

/**
 * 抽象支持hibernate自动版本控制以及逻辑删除的抽象类
 * 
 * @author MaKuBEX Email:makubexnet@gmail.com
 * @version 1.0.0 2011
 * @since 1.0.0
 * 
 */
@MappedSuperclass
public abstract class AbstractLogicalVersionControlDomainObject extends
		AbstractNormalDomainObject implements IVersionControlSupportedDomain,
		ILogicalRemoveSupportedDomain {

	@Version
	@Column(name = "VERSION_", nullable = false)
	protected Integer version;
	@Enumerated(value = EnumType.ORDINAL)
	@Column(name = "DELETED_IND")
	protected EnumDeletedIndentifying deletedInd;

	/**
	 * @serialField
	 */
	private static final long serialVersionUID = 4834102104412110263L;

	/**
	 * @return the deletedInd
	 */
	public EnumDeletedIndentifying getDeletedInd() {
		return deletedInd;
	}

	/**
	 * @return the version
	 */
	public Integer getVersion() {
		return version;
	}

	/**
	 * @param deletedInd
	 *            the deletedInd to set
	 */
	public void setDeletedInd(EnumDeletedIndentifying deletedInd) {
		this.deletedInd = deletedInd;
	}

	/**
	 * @param version
	 *            the version to set
	 */
	public void setVersion(Integer version) {
		this.version = version;
	}
}
